#include "Error.h"
#include "Log.h"

#ifdef WIN32
	#include <Windows.h>
#else
	#include <iostream>
#endif

namespace Engine
{
	void Error(const std::string& message)
	{
		#ifdef WIN32
			MessageBoxA(0, message.c_str(), "Error", MB_ICONSTOP);
			Log("Error: " + message);
		#else
			std::cout << "Error:" << message << std::endl;
		#endif
		exit(0);
	}

	void Warning(const std::string& message)
	{
		#ifdef WIN32
			MessageBoxA(0,  message.c_str(), "Warning", MB_ICONEXCLAMATION);
			Log("Warning: " + message);
		#else
			std::cout << "Warning:" << message << std::endl;
		#endif
	}
}